<header>
    <div class="mainBox">
        <div class="logo">
            <h1>宁夏商务云</h1>
            <em>Ningxia Commerce Cloud</em>
        </div>
        <ul>
            <li data-index="1"><a href="/">首页</a></li>
            <li data-index="2"><a href="javascript:;">通知公告</a></li>
            <li data-index="3"><a href="javascript:;">商务动态</a></li>
            <li data-index="4"><a href="javascript:;">经贸合作</a></li>
            <li data-index="5"><a href="javascript:;">中阿博览会</a></li>
            <li data-index="6"><a href="video.asp">视频中心</a></li>
            <li data-index="7"><a href="imgList.asp">图片中心</a></li>
        </ul>
    </div>

    <div class="search" id="search">
        <input type="text" placeholder="请输入关键字">
        <button>
            <img src="../images/icon1.png" alt="">
            <img class="hide" src="../images/icon2.png" alt="">
            <span>搜索</span>
        </button>
    </div>
</header>

<div class="headerWap flexs flexsBet">
    <div class="logo">
        <h1>宁夏商务云</h1>
        <em>Ningxia Commerce Cloud</em>
    </div>
    <img class="three" src="./images/m_three.png" alt="">
    <div class="nav_wap">
        <div class="main">
            <ul class="flexs list">
                <li><a href="/">首页</a></li>
                <li><a href="javascript:;">通知公告</a></li>
                <li><a href="javascript:;">商务动态</a></li>
                <li><a href="javascript:;">经贸合作</a></li>
                <li><a href="javascript:;">中阿博览会</a></li>
                <li><a href="video.asp">视频中心</a></li>
                <li><a href="imgList.asp">图片中心</a></li>
            </ul>
            <div class="inp">
                <input onclick="searchFn($(this),'search.asp')" type="submit" value="">
                <input type="text" placeholder="搜索">
            </div>
        </div>
    </div>
</div>
<script>
    $('#search button').click(function () {
        w = $(window).width()
        console.log(w)
        if ($(this).parents('#search').hasClass('active')) {
            window.location.href = "search.asp?val=" + $(this).siblings('input').val()
            return false
        }
        $(this).parents('#search').toggleClass('active')
    })

    $('.three').click(function () {
        $('.nav_wap').stop().slideToggle()
    })
</script>